var e = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), t = require("../../@babel/runtime/helpers/asyncToGenerator"), r = (getApp(), 
require("../../http/userApi.js"));

Component({
    options: {
        addGlobalClass: !0
    },
    properties: {},
    data: {
        agree: !1
    },
    lifetimes: {
        ready: function() {
            this.loadData();
        }
    },
    methods: {
        nullOnTap: function() {},
        checkOnChange: function(e) {
            this.setData({
                agree: e.detail.value.length > 0
            });
        },
        setAddressOnTap: function() {
            this.data.agree && this.triggerEvent("onAgree", {});
        },
        loadData: function() {
            var a = this;
            return t(e.default.mark(function t() {
                var n;
                return e.default.wrap(function(e) {
                    for (;;) switch (e.prev = e.next) {
                      case 0:
                        return e.prev = 0, e.next = 3, r.deliveryAgreement();

                      case 3:
                        n = e.sent, a.setData({
                            content: n.msg
                        }), e.next = 10;
                        break;

                      case 7:
                        e.prev = 7, e.t0 = e.catch(0), console.log(e.t0);

                      case 10:
                      case "end":
                        return e.stop();
                    }
                }, t, null, [ [ 0, 7 ] ]);
            }))();
        }
    }
});